<template>
	<view class="box">
		<uni-list-item :to="'/pages/setting/userinfo/userinfo'" :avatar-circle="true" :title="userinfo.name"
			thumb-size="lg" :thumb="userinfo.avater" :note="userinfo.phone" time="2020-02-02 20:20"
			:show-extra-icon="true" showArrow :extra-icon="extraIcon"></uni-list-item>
		<view class="list">
			<uni-list-item title="手机号修改" showArrow :show-extra-icon="true" :extra-icon="extraIcon"></uni-list-item>
			<uni-list-item title="支付密码修改" showArrow :show-extra-icon="true" :extra-icon="extraIcon"></uni-list-item>
		</view>
		<view class="list">
			<uni-list-item title="消息提醒" showArrow :show-extra-icon="true" :extra-icon="extraIcon"></uni-list-item>
			<uni-list-item title="邀请好友" showArrow :show-extra-icon="true" :extra-icon="extraIcon"></uni-list-item>
		</view>
		<view class="list">
			<uni-list-item title="关于" showArrow :show-extra-icon="true" :extra-icon="extraIcon"></uni-list-item>
			<uni-list-item title="责任声明" showArrow :show-extra-icon="true" :extra-icon="extraIcon"></uni-list-item>
		</view>
		<view class="list">
			<uni-list-item title="检查更新" showArrow :show-extra-icon="true" :extra-icon="extraIcon"></uni-list-item>
			<uni-list-item title="意见反馈" showArrow :show-extra-icon="true" :extra-icon="extraIcon"></uni-list-item>
			<uni-list-item title="清理缓存" showArrow :show-extra-icon="true" :extra-icon="extraIcon"></uni-list-item>
		</view>
		<uni-list-item title="QQ群交流" showArrow :show-extra-icon="true" :extra-icon="extraIcon"></uni-list-item>
		<button class="outlogin" @click="gotologin">退出登录</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				extraIcon: {
					color: '#4cd964',
					size: '22',
					type: 'color'
				},
				userinfo: {
					name: "",
					phone: "",
					avater: ""
				}
			}
		},
		mounted() {
			this.userinfo = uni.getStorageSync("userinfo")
		},
		methods: {
			Goto(path) {
				uni.navigateTo({
					url: "/pages/setting/userinfo/userinfo"
				})
			},
			gotologin() {
				uni.removeStorage({
					key: 'userinfo',
					success: function(res) {
						uni.navigateTo({
							url: "/pages/login/login"
						})
					}
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.outlogin {
		background-color: #ff5e81;
		border-radius: 20px;
		margin-top: 20px;
		color: #fff;
	}

	.box {
		height: 100vh;
		padding: 10px;
		background-color: #ecfdfa;
	}

	.list {
		margin: 20px 0;
	}

	.chat-custom-right {
		flex: 1;
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: column;
		justify-content: space-between;
		align-items: flex-end;
	}

	.chat-custom-text {
		font-size: 12px;
		color: #999;
	}
</style>